﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Site/Master/Main.Master" AutoEventWireup="true"
    CodeBehind="Shopping2.aspx.cs" Inherits="ECommerce.Web.Site.Shopping2" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
    <link href="styles/shoppingone.css" rel="stylesheet" type="text/css" />
         <script src="../Common/Js/Calendar.js" type="text/javascript"></script>

<script type="text/javascript">
function copy()
{
    $("#<%=RecieveName.ClientID %>").val($("#<%=SendName.ClientID %>").val());
    $("#<%=RecieveMobile.ClientID %>").val($("#<%=SendMobile.ClientID %>").val());
    $("#<%=RecieveAddress.ClientID %>").val($("#<%=SendAddress.ClientID %>").val());
   
    document.getElementById("recieveGender1").checked = document.getElementById("sendGender1").checked;
    document.getElementById("recieveGender2").checked = document.getElementById("sendGender2").checked;

  //  $("#<%=RecieveArea.ClientID%>").val($("#<%=SendArea.ClientID%>").val());
  




}
function selectTakeMode(index)
{
    if (index == 1)
    {
        $("#t1").show();
        $("#t2").hide();

        $("#div1").show();
        $("#div2").hide();
    }
    else
    {
        $("#t2").show();
        $("#t1").hide();

        $("#div2").show();
        $("#div1").hide();
    }
}

function validate()
{
    var value = $("#<%=SendName.ClientID %>").val();
    if (value == "")
    {
        alert("请输入发货人姓名");
        return false;
    }

    value = $("#<%=SendMobile.ClientID %>").val();
    if (value == "")
    {
        alert("请输入发货人电话");
        return false;
    }

    value = $("#<%=SendAddress.ClientID %>").val();
    if (value == "")
    {
        alert("请输入发货人地址");
        return false;
    }

    value = $("#<%=SendMobile.ClientID %>").val();
    if (isNaN(value) || (value.length != 11 && value.length != 8))
    {
        alert("请输入有效的11手机号码或8位电话号码");
        return false;
    }
   
//    if ($("#Radio2").get(0).checked)
//    {
        value = $("#<%=RecieveName.ClientID %>").val();
        if (value == "")
        {
            alert("请输入收货人姓名");
            return false;
        }

        value = $("#<%=RecieveMobile.ClientID %>").val();
        if (value == "")
        {
            alert("请输入收货人电话");

            return false;
        }

        value = $("#<%=RecieveMobile.ClientID %>").val();
        if (isNaN(value) || (value.length != 11 && value.length != 8))
        {
            alert("请输入有效的11手机号码或8位电话号码");
            return false;
        }

        value = $("#<%=RecieveAddress.ClientID %>").val();
        if (value == "")
        {
            alert("请输入收货人地址");
            return false;
        }
//    }
   
    return true;
}

function bigarea_change(sender)
{
    var value = $(sender).val();
    if (value == 0)
    {
        $("#spanFreight").text("￥15.00");
    }
    else
    {
        $("#spanFreight").text("￥30.00");
    }
}
</script>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
<%--<asp:ScriptManager ID="ScriptManager1" runat="server">
    </asp:ScriptManager>--%>
    <div id="main">
        <div class="shoppingtwo">
            <p>
                <span class="tl">1.查看购物车
                </span><span class="tll">2.填写核对信息单</span><span>3.成功提交订单</span></p>
            <ul>
                <li class="tit"><span class="left">产品清单</span><span class="right"><a href="Shopping1.aspx">回到购物车，修改产品>></a></span></li>
                <li class="title"><span class="one">商品</span><span class="two">编号</span><span class="three">名称</span>
                    <!--<span class="four">尺寸</span>--><span class="five">原价</span><span class="six">现价</span><span class="seven">vip价</span>
                    <span class="eight">数量</span> </li>
                <asp:Repeater ID="rpt" runat="server">
                <ItemTemplate>
                    <li class="content"><span class="one">
                    <img src='<%#Eval("SmallImageAbsPath") %>' style="width:62px; height:62px;" alt="" /></span><span class="two"><%#Eval("ID") %></span><span class="three"><%#Eval("Name") %></span>
                    <!--<span class="four"><%#Eval("Size") %></span>--><span class="five"><%#Eval("OldPrice","{0:c2}") %></span><span class="six"><%#Eval("CurrentPrice","{0:c2}") %></span><span class="seven"><%#Eval("VipPrice","{0:c2}") %></span><span class="eight"><%#Eval("BuyCount") %></span> </li>
                </ItemTemplate>
                </asp:Repeater>               
                <li class="goback">
                    <div class="left">
                        <h3>
                            <a href="shopping1.aspx">回到购物车，修改产品>></a> <span>产品数量总计：<asp:Literal ID="litProductCount"
                                runat="server"></asp:Literal>件</span>
                        </h3>                       
                    </div>
                    <div class="right">
                        <h5>
                            产品金额共计：<asp:Literal ID="litTotalPrice" runat="server"></asp:Literal></h5>
                        <h5>
                            运费：<span id="spanFreight"><asp:Literal ID="litFreight" runat="server"></asp:Literal></span></h5>
                       
                    </div>
                    <div class="clear">
                    </div>
                </li>
            </ul>
            <%--<div class = "sendmess" style="margin-bottom:10px;">
                <h1 class="weight">
                    配送方式:</h1>
                <div class="sendbox" style="border-bottom-width:0px">
                    <input id="Radio1" onclick="selectTakeMode(1)" type="radio" name="LogisticsType" value="0" /> <label for="Radio1">选择门店自提</label>
                    &nbsp;&nbsp;&nbsp;
                    <input id="Radio2" onclick="selectTakeMode(2)" type="radio" name="LogisticsType" value="1" checked="checked" /> <label for="Radio2">选择送货上门</label>
                </div>
            </div>--%>
            <asp:Panel ID="pnlMain" CssClass="sendmess" runat="server">         
                <h1 class="weight">
                    订货人信息:</h1>
                <div class="sendbox">
                    <h2>
                        <span>姓名：</span><asp:TextBox ID="SendName" runat="server" CssClass="text" ></asp:TextBox><em>*</em>
                        <input id="sendGender1" name="SendGender" value="先生" type="radio" checked="checked" /><label for="sendGender1"> 先生</label><input
                          name="SendGender" id="sendGender2" value="女士"  type="radio" /><label for="sendGender2">女士</label>
                    </h2>
                    <h2>
                        <span>联系电话：</span><asp:TextBox ID="SendMobile" runat="server" CssClass="text"></asp:TextBox><em>*</em>
                    </h2>                   
                    <h2>
                        <span>地址：</span><asp:DropDownList ID="SendArea" runat="server">
                            </asp:DropDownList>
                       <!-- <asp:DropDownList ID="BigArea" runat="server" onchange="bigarea_change(this)">
                        </asp:DropDownList>-->
                        <asp:TextBox ID="SendAddress" runat="server" CssClass="text1" 
                            Width="436px"></asp:TextBox><em>*</em></h2>
                   
                </div>
                 
              <%--  <h1 id="t1" class="weight">
                    选择门店：</h1>--%>
                <h1 id="t2" class="weight">
                    收货人地址：&nbsp;&nbsp;&nbsp;&nbsp;<input id="Button2" type="button" value="复制订货人信息" onclick="copy()"
                        style="background-color: #FFEBA5; border: 1px solid #BDAE7B; width: 100px; color: #8C825A;
                        height: 25px;" /></h1>
                <div class="sendbox">
                    <%--<div id="div1">
                    <asp:UpdatePanel ID="UpdatePanel1" runat="server">
                    <ContentTemplate>
                        <h2>
                            <span>门店区域：</span><asp:DropDownList ID="drpArea" runat="server" 
                                AutoPostBack="True" 
                                onselectedindexchanged="DropDownList1_SelectedIndexChanged">
                            </asp:DropDownList>
                        </h2>                        
                        
                        <h3>
                            <span>详细地址：</span><asp:ListBox ID="lstAddress" runat="server" Height="150px" 
                                Width="531px">
                            </asp:ListBox>
                        </h3>
                        </ContentTemplate>
                      </asp:UpdatePanel>
                    </div>--%>
                    <div id="div2">
                        <h2>
                            <span>收货人姓名：</span><asp:TextBox ID="RecieveName" runat="server" CssClass="text"></asp:TextBox><em>*</em><input
                                type="radio" id="recieveGender1" checked="checked" value="先生" name="RecieveGender" />
                            <label for="recieveGender1">先生</label>
                            <input type="radio" id="recieveGender2" value="女士" name="RecieveGender" /><label for="recieveGender2"> 女士</label>
                        </h2>
                        <h2>
                            <span>收货人电话：</span><asp:TextBox ID="RecieveMobile" runat="server" CssClass="text"></asp:TextBox><em>*</em>（请填写移动电话）
                        </h2>                        
                        <h2>
                            <span>收货人地址：</span><asp:DropDownList ID="RecieveArea" runat="server">

                            </asp:DropDownList>
                             <asp:DropDownList ID="RecieveBigArea" runat="server" onchange="bigarea_change(this)">
                        </asp:DropDownList>
                            <asp:TextBox ID="RecieveAddress" Width="436px" runat="server" CssClass="text1"></asp:TextBox><em>*</em>
                        </h2>
                        <h2>
                            <span>&nbsp;</span>暂不支持上海外环线以外送货上门
                        </h2>
                        <h2>
                            <span>送货日期：</span><asp:TextBox ID="DeliverTime" runat="server" CssClass="text"></asp:TextBox><asp:DropDownList
                                ID="DeliverPart" runat="server">
                            </asp:DropDownList>
                        </h2>
                        <%--<h3>
                            <span>卡片祝福语：</span><asp:TextBox ID="Wishes" TextMode="MultiLine" runat="server"></asp:TextBox></h3>
                        <asp:ValidationSummary ID="ValidationSummary1" runat="server" ShowMessageBox="True"
                            ShowSummary="False" />
                        <h2>
                            <span>&nbsp;</span>请控制字数在100个字以内</h2>
                        <h2>
                            <span>是否匿名：</span><input type="radio" id="rd1" value="0" checked="checked" name="Anonymity" /><label
                                for="rd1">
                                当然不要匿名，万一误了我岂不是很亏</label><input type="radio" id="rd2" name="Anonymity" />
                            <label for="rd2">
                                我要匿名，我要给他一个惊喜</label>
                        </h2>--%>
                        <h3>
                            <span>备注说明：</span><asp:TextBox ID="Remark" TextMode="MultiLine" runat="server"></asp:TextBox>
                            
                            </h3>
                        <h2>
                            <span>　</span>如需销售凭证，请在备注说明里写明。
                        </h2>
                        <h2>
                            <span>支付方式</span><input id="Radio1" name="interface" type="radio" value="0" checked="checked"/> <label for="Radio1"> <img src="images/mt1.jpg" /></label>
                            <input id="Radio2" name="interface" type="radio" value="1" /> <label for="Radio2"> <img src="images/mt2.jpg" /></label>
                            <input id="Radio3" name="interface" type="radio" value="2" /> <label for="Radio3"> <img src="images/mt3.jpg" /></label>
                        </h2>
                            
                    </div>
                    <h4 style="margin-top:20px;">
                        <asp:Button ID="btnNext" runat="server" Text="下一步" OnClick="btnNext_Click" OnClientClick="return validate()" />
                        </h4>
                </div>

                <!--<h1 class="weight">
                    发票信息:</h1>
                <div class="sendbox">
                    <h2>
                        <span>发票类型：</span>普通发票
                    </h2>
                    <h2>
                        <span>发票抬头：</span><input id="Radio3" type="radio" onclick="invoice_click(1)" name="InvoiceTarget" checked="checked" value="0" /><label for="Radio3">个人</label>
                        <input id="Radio4" type="radio" onclick="invoice_click(2)"  name="InvoiceTarget" value="1"  /><label for="Radio4">单位</label><asp:TextBox ID="InvoiceHead" style="display:none"
                            CssClass="text" runat="server"></asp:TextBox>
                    </h2>

                                        

                </div>-->
               <script type="text/javascript">
                   function invoice_click(i)
                   {
                       if (i == 1)
                       {
                           $("#<%=InvoiceHead.ClientID %>").hide();
                       }
                       else
                       {
                           $("#<%=InvoiceHead.ClientID %>").show();
                       }
                   }
               </script>
            </asp:Panel>
        </div>
    </div>
</asp:Content>
